package pingji.service.query.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pingji.dao.query.QueryUserDao;
import pingji.pojo.User;
import pingji.service.query.QueryUserService;
import pingji.service.query.UserService;

@Service
public class QueryUserServiceImpl implements QueryUserService {
    @Autowired
    QueryUserDao dao;
    @Override
    public UserService query(Integer id) {
        UserService user=new UserService();
        User d = dao.queryById(id);
        user.setId(d.getId());
        user.setName(d.getName());
        user.setIsVIP(d.getIsVIP());
        return user;
    }
}
